<?php

class ServiceLocator {
	
	protected var $singleton = null;
	protected $maps = array();
	
	private function __construct() {
		
	}
	
	function getContainer() {
		if( $this->singleton === null ) {
			$this->singleton = new self();
		}
		return $this->singleton;
	}
	
	function lookup( $service ) {
		return $service;
	}
	
	function register( $service ) {
		$maps[get_class($service)] = $service;
	}
	
	function unregister($servicename) {
		unset( $maps[$servicename] );
	}
	
	function resolve($service) {
		return 'something';
	}

}